﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<MySite.Model.VoteInfo>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	修改投票
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>
        修改投票</h2>
    <% using (Html.BeginForm()) {%>
    <%= Html.ValidationSummary(true) %>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="listable">
        <tr class="listheader">
            <td colspan="2">
                <h2>
                    投票内容</h2>
                    <%:Html.HiddenFor(Model=>Model.ID,new{ @class = "inputxt"}) %>
                    <%:Html.HiddenFor(Model=>Model.Author,new{ @class = "inputxt"}) %>
            </td>
        </tr>
        <tr>
            <td align="right" class="bj-grey-bg f-blue-1218">
                投票主题
            </td>
            <td>
                <%: Html.TextBoxFor(model => model.Title, new { @class = "inputxt_200" })%>
            </td>
        </tr>
        <tr>
            <td align="right" class="bj-grey-bg f-blue-1218">
                投票选项
            </td>
            <td>
            <%
           string VoteItems = "";
           foreach (var item in (ViewData["viiList"] as IList<MySite.Model.VoteItemInfo>))
              {
                  VoteItems += item.Text + "\n";
              } %>
                <textarea name="VoteItems" id="VoteItems" rows="10" cols="40"><%=VoteItems%></textarea>
            </td>
        </tr>
        <tr>
            <td align="right" class="bj-grey-bg f-blue-1218">
                开始时间
            </td>
            <td>
                <%=Html.CalendarFor(model => model.BeginDate)%>
            </td>
        </tr>
        <tr>
            <td align="right" class="bj-grey-bg f-blue-1218">
                结束时间
            </td>
            <td>
                <%= Html.CalendarFor(model => model.EndDate)%>
            </td>
        </tr>
        <tr>
            <td align="right" class="bj-grey-bg f-blue-1218">
                是否已经过期
            </td>
            <td>
                否:<%: Html.RadioButtonFor(model => model.IsOver,false, ViewData["inputcss"] as Dictionary<string, object>)%>
                是:<%: Html.RadioButtonFor(model => model.IsOver,true, ViewData["inputcss"] as Dictionary<string, object>)%>
            </td>
        </tr>
    </table>
    <div class="bj-sp10">
    </div>
    <div class="f-blue-1218 bj-center">
        <input type="submit" class="admin_btn" value="保存" />
    </div>
    <% } %>
    <div>
        <%= Html.ActionLink("返回", "VoteList") %>
    </div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>

